// 自定义组件v-model
export function useVmodel(props: any, key = 'modelValue', emit?: any) {
  const vm = getCurrentInstance()
  const _emit = emit || vm?.emit
  const event = `update:${key}`
  const proxy = ref(props[key])
  watch(
    () => proxy.value,
    (v) => _emit(event, v)
  )
  return proxy
}
